package www.ld.com.domain.post.vo;


import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import www.ld.com.core.group.InsertGroup;
import www.ld.com.core.group.UpdateGroup;
import www.ld.com.dictionary.UseStatusEnum;
import javax.validation.constraints.NotBlank;

@Data
@Accessors(chain = true)
@ToString
@EqualsAndHashCode
public class InPostVO {
    @ApiModelProperty(value = "岗位ID")
    @NotBlank(message = "岗位ID不能为空",groups = UpdateGroup.class)
    private String id;
    @ApiModelProperty(value = "岗位名称")
    @Length(max = 20,min = 2,message = "岗位名称必须是{min}~{max}个字符" ,groups = {UpdateGroup.class, InsertGroup.class} )
    @NotBlank(message = "岗位名称不能为空" ,groups = {UpdateGroup.class, InsertGroup.class}  )
    private String name;
    @ApiModelProperty(value = "岗位编码")
    @Length(max = 20,min = 2,message = "岗位编码必须是{min}~{max}个字符" )
    @NotBlank(message = "岗位编码名称不能为空" ,groups = {UpdateGroup.class, InsertGroup.class} )
    private String code;
    @ApiModelProperty(value = "岗位状态")
    private UseStatusEnum status;
    @ApiModelProperty(value = "岗位排序")
    @Range( max = 100,message = "岗位排序不能大于{max}" ,groups = {UpdateGroup.class, InsertGroup.class} )
    private Integer sort;
    @Length(max = 255, message = "备注不能大于{max}个字符",groups = {UpdateGroup.class, InsertGroup.class}  )
    private String remarks;


}

